// ------------------------------------------------------------------------------------------
// Licensed by Interprise Solutions.
// http://www.InterpriseSolutions.com
// For details on this license please visit  the product homepage at the URL above.
// THE ABOVE NOTICE MUST REMAIN INTACT.
// ------------------------------------------------------------------------------------------
using System.Xml;
using System.Xml.Serialization;
using InterpriseSuiteEcommerceCommon;

namespace InterpriseSuiteEcommerceGateways.gc
{
    public enum RoundingMode { UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN, UNNECESSARY }
    public enum RoundingRule { PER_LINE, TOTAL }
    public enum USAreas { CONTINENTAL_48, FULL_50_STATES, ALL }
    public enum FulfillmentOrderState { NEW, PROCESSING, DELIVERED, WILL_NOT_DELIVER }
    public enum FinancialOrderState { REVIEWING, CHARGEABLE, CHARGING, CHARGED, PAYMENT_DECLINED, CANCELLED_BY_GOOGLE, CANCELLED }

    [XmlRoot("checkout-shopping-cart")]
    public partial class CheckoutShoppingCart
    {
        [XmlElement("shopping-cart")]
        public ShoppingCart shoppingcart = new gc.ShoppingCart();
        [XmlElement("checkout-flow-support")]
        public CheckoutShoppingCartCheckoutflowsupport checkoutflowsupport;
        [XmlElement("order-processing-support")]
        public OrderProcessingSupport orderprocessingsupport;
    }

    [XmlRoot("checkout-redirect")]
    public partial class CheckoutRedirect
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlElement("redirect-url")]
        public string redirecturl;
    }

    [XmlRoot("charge-order")]
    public partial class ChargeOrderRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
        [XmlElement("amount")]
        public Money amount;
    }

    [XmlRoot("refund-order")]
    public partial class RefundOrderRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
        [XmlElement("comment")]
        public string comment;
        [XmlElement("amount")]
        public Money amount;
        [XmlElement("reason")]
        public string reason;
    }

    [XmlRoot("cancel-order")]
    public partial class CancelOrderRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
        [XmlElement("comment")]
        public string comment;
        [XmlElement("reason")]
        public string reason;
    }

    [XmlRoot("authorize-order")]
    public partial class AuthorizeOrderRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
    }

    [XmlRoot("process-order")]
    public partial class ProcessOrderRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
    }

    [XmlRoot("deliver-order")]
    public partial class DeliverOrderRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
        [XmlElement("tracking-data")]
        public TrackingData trackingdata;
        [XmlElement("send-email")]
        public bool sendemail;
        [XmlIgnoreAttribute()]
        public bool sendemailSpecified;
    }

    [XmlRoot("add-tracking-data")]
    public partial class AddTrackingDataRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
        [XmlElement("tracking-data")]
        public TrackingData trackingdata = new gc.TrackingData();
    }

    [XmlRoot("send-buyer-message")]
    public partial class SendBuyerMessageRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
        [XmlElement("message")]
        public string message;
        [XmlElement("send-email")]
        public bool sendemail;
        [XmlIgnoreAttribute()]
        public bool sendemailSpecified;
    }

    [XmlRoot("archive-order")]
    public partial class ArchiveOrderRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
    }

    [XmlRoot("unarchive-order")]
    public partial class UnarchiveOrderRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
    }

    [XmlRoot("add-merchant-order-number")]
    public partial class AddMerchantOrderNumberRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
        [XmlElement("merchant-order-number")]
        public string merchantordernumber;
    }

    [XmlRoot("request-received")]
    public partial class RequestReceivedResponse
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
    }

    [XmlRoot("new-order-notification")]
    public partial class NewOrderNotification
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlElement("timestamp")]
        public System.DateTime timestamp;
        [XmlElement("shopping-cart")]
        public ShoppingCart shoppingcart;
        [XmlElement("google-order-number")]
        public string googleordernumber;
        [XmlElement("order-adjustment")]
        public OrderAdjustment orderadjustment;
        [XmlElement("buyer-shipping-address")]
        public Address buyershippingaddress;
        [XmlElement("buyer-billing-address")]
        public Address buyerbillingaddress;
        [XmlElement("buyer-marketing-preferences")]
        public BuyerMarketingPreferences buyermarketingpreferences;
        [XmlElement("order-total")]
        public Money ordertotal;
        [XmlElement("fulfillment-order-state")]
        public FulfillmentOrderState fulfillmentorderstate;
        [XmlElement("financial-order-state")]
        public FinancialOrderState financialorderstate;
        [XmlElement("buyer-id")]
        public long buyerid;
    }

    [XmlRoot("buyer-marketing-preferences")]
    public partial class BuyerMarketingPreferences
    {
        [XmlElement("email-allowed")]
        public bool emailallowed;
    }

    [XmlRoot("order-state-change-notification")]
    public partial class OrderStateChangeNotification
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlElement("timestamp")]
        public System.DateTime timestamp;
        [XmlElement("google-order-number")]
        public string googleordernumber;
        [XmlElement("reason")]
        public string reason;
        [XmlElement("new-fulfillment-order-state")]
        public FulfillmentOrderState newfulfillmentorderstate;
        [XmlElement("new-financial-order-state")]
        public FinancialOrderState newfinancialorderstate;
        [XmlElement("previous-fulfillment-order-state")]
        public FulfillmentOrderState previousfulfillmentorderstate;
        [XmlElement("previous-financial-order-state")]
        public FinancialOrderState previousfinancialorderstate;
    }

    [XmlRoot("charge-amount-notification")]
    public partial class ChargeAmountNotification
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlElement("timestamp")]
        public System.DateTime timestamp;
        [XmlElement("google-order-number")]
        public string googleordernumber;
        [XmlElement("latest-charge-amount")]
        public Money latestchargeamount;
        [XmlElement("total-charge-amount")]
        public Money totalchargeamount;
    }

    [XmlRoot("chargeback-amount-notification")]
    public partial class ChargebackAmountNotification
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlElement("timestamp")]
        public System.DateTime timestamp;
        [XmlElement("google-order-number")]
        public string googleordernumber;
        [XmlElement("latest-chargeback-amount")]
        public Money latestchargebackamount;
        [XmlElement("total-chargeback-amount")]
        public Money totalchargebackamount;
    }

    [XmlRoot("refund-amount-notification")]
    public partial class RefundAmountNotification
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlElement("timestamp")]
        public System.DateTime timestamp;
        [XmlElement("google-order-number")]
        public string googleordernumber;
        [XmlElement("latest-refund-amount")]
        public Money latestrefundamount;
        [XmlElement("total-refund-amount")]
        public Money totalrefundamount;
    }

    [XmlRoot("risk-information-notification")]
    public partial class RiskInformationNotification
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlElement("timestamp")]
        public System.DateTime timestamp;
        [XmlElement("google-order-number")]
        public string googleordernumber;
        [XmlElement("risk-information")]
        public RiskInformation riskinformation;
    }

    [XmlRoot("authorization-amount-notification")]
    public partial class AuthorizationAmountNotification
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlElement("timestamp")]
        public System.DateTime timestamp;
        [XmlElement("google-order-number")]
        public string googleordernumber;
        [XmlElement("avs-response")]
        public string avsresponse;
        [XmlElement("cvn-response")]
        public string cvnresponse;
        [XmlElement("authorization-amount")]
        public Money authorizationamount;
        [XmlElement("authorization-expiration-date")]
        public System.DateTime authorizationexpirationdate;
    }

    [XmlRoot("notification-acknowledgment")]
    public partial class NotificationAcknowledgment { }

    [XmlRoot("merchant-calculation-callback")]
    public partial class MerchantCalculationCallback
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlElement("shopping-cart")]
        public ShoppingCart shoppingcart;
        [XmlElement("buyer-id")]
        public long buyerid;
        [XmlIgnoreAttribute()]
        public bool buyeridSpecified;
        [XmlElement("buyer-language")]
        public string buyerlanguage;
        [XmlElement("calculate")]
        public Calculate calculate;
    }

    [XmlRoot("merchant-calculation-results")]
    public partial class MerchantCalculationResults
    {
        [XmlArrayItem("result", IsNullable = false)]
        public Result[] results;
    }

    [XmlRoot("error")]
    public partial class ErrorResponse
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlArray("warning-messages")]
        public string[] warningmessages;
        [XmlElement("error-message")]
        public string errormessage;
    }

    [XmlRoot("diagnosis")]
    public partial class DiagnoseResponse
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
        [XmlElement("input-xml")]
        public XmlElement inputxml;
        [XmlArrayItem()]
        public string[] warnings;
    }

    [XmlRoot("ship-items")]
    public partial class ShipItemsRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
        [XmlElement("send-email")]
        public bool sendemail;
        [XmlIgnoreAttribute()]
        public bool sendemailSpecified;

        [XmlArray("item-shipping-information-list")]
        [XmlArrayItem("item-shipping-information")]
        [XmlElement("itemshippinginformationlist")]
        public ItemShippingInformation[] itemshippinginformationlist;

    }

    [XmlRoot("reset-items-shipping-information")]
    public partial class ResetItemsShippingInformationRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;

        [XmlArray("item-ids")]
        [XmlArrayItem("item-id")]
        public ItemId[] itemids;

        [XmlElement("send-email")]
        public bool sendemail;
        [XmlIgnoreAttribute()]
        public bool sendemailSpecified;
    }

    [XmlRoot("cancel-items")]
    public partial class CancelItemsRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;
        [XmlElement("comment")]
        public string comment;
        [XmlElement("reason")]
        public string reason;

        [XmlArray("item-ids")]
        [XmlArrayItem("item-id")]
        public ItemId[] itemids;

        [XmlElement("send-email")]
        public bool sendemail;
        [XmlIgnoreAttribute()]
        public bool sendemailSpecified;
    }

    [XmlRoot("return-items")]
    public partial class ReturnItemsRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;

        [XmlArray("item-ids")]
        [XmlArrayItem("item-id")]
        public ItemId[] itemids;

        [XmlElement("send-email")]
        public bool sendemail;
        [XmlIgnoreAttribute()]
        public bool sendemailSpecified;
    }

    [XmlRoot("backorder-items")]
    public partial class BackorderItemsRequest
    {
        [XmlAttribute("google-order-number")]
        public string googleordernumber;

        [XmlArray("item-ids")]
        [XmlArrayItem("item-id")]
        public ItemId[] itemids;

        [XmlElement("send-email")]
        public bool sendemail;
        [XmlIgnoreAttribute()]
        public bool sendemailSpecified;
    }

    [XmlRoot("bye")]
    public partial class Bye
    {
        [XmlAttribute("serial-number")]
        public string serialnumber;
    }

    [XmlRoot("demo-failure")]
    public partial class DemoFailure
    {
        [XmlElement("message")]
        public string message;
    }

    public partial class ItemId
    {
        [XmlElement("merchant-item-id")]
        public string Merchantitemid;
    }

    public partial class ItemShippingInformation
    {
        [XmlElement("item-id")]
        public ItemId itemid;

        [XmlArray("tracking-data-list")]
        [XmlArrayItem("tracking-data")]
        public TrackingData[] trackingdatalist;
    }

    public partial class TrackingData
    {
        [XmlElement("carrier")]
        public string carrier;
        [XmlElement("tracking-number")]
        public string trackingnumber;
    }

    public partial class GiftCertificateResult
    {
        [XmlElement("valid")]
        public bool valid;
        [XmlElement("message")]
        public string message;
        [XmlElement("calculated-amount")]
        public GiftCertificateResultCalculatedamount calculatedamount;
        [XmlElement("code")]
        public string code;
    }

    public partial class GiftCertificateResultCalculatedamount : Money { }

    public partial class Money
    {
        [XmlAttribute("currency")]
        public string Currency;
        [XmlText()]
        public decimal Value;
    }

    public partial class CouponResult
    {
        [XmlElement("valid")]
        public bool valid;
        [XmlElement("message")]
        public string message;
        [XmlElement("calculated-amount")]
        public CouponResultCalculatedamount calculatedamount;
        [XmlElement("code")]
        public string code;
    }

    public partial class CouponResultCalculatedamount : Money { }

    public partial class Result
    {
        [XmlAttribute("shipping-name")]
        public string shippingname;
        [XmlAttribute("address-id")]
        public string addressid;
        [XmlElement("shippable")]
        public bool shippable;
        [XmlIgnoreAttribute()]
        public bool shippableSpecified = false; // shippableSpecified added to get carrier calculated shipping working
        [XmlElement("total-tax")]
        public ResultTotaltax totaltax;
        [XmlElement("shipping-rate")]
        public ResultShippingrate shippingrate;
        [XmlElement("merchant-code-results")]
        public ResultMerchantcoderesults merchantcoderesults;
    }

    public partial class ResultTotaltax : Money { }

    public partial class ResultShippingrate : Money { }

    public partial class ResultMerchantcoderesults
    {
        [XmlElement("coupon-result", typeof(CouponResult))]
        [XmlElement("gift-certificate-result", typeof(GiftCertificateResult))]
        public object[] Items;
    }

    public partial class MerchantCodeString
    {
        [XmlAttribute("code")]
        public string code;
    }

    public partial class Method
    {
        [XmlAttribute("name")]
        public string name;
    }

    public partial class Calculate
    {
        [XmlElement("tax")]
        public bool tax;
        [XmlArrayItem("method")]
        public Method[] shipping;

        [XmlArray("merchant-code-strings")]
        [XmlArrayItem("merchant-code-string")]
        public MerchantCodeString[] merchantcodestrings;

        [XmlArrayItem("anonymous-address")]
        public AnonymousAddress[] addresses;
    }

    public partial class AnonymousAddress
    {
        [XmlElement("country-code")]
        public string countrycode;
        [XmlElement("region")]
        public string region;
        [XmlElement("city")]
        public string city;
        [XmlElement("postal-code")]
        public string postalcode;
        [XmlAttribute("id")]
        public string id;
    }

    public partial class RiskInformation
    {
        [XmlElement("eligible-for-protection")]
        public bool eligibleforprotection;
        [XmlElement("billing-address")]
        public Address billingaddress;
        [XmlElement("avs-response")]
        public string avsresponse;
        [XmlElement("cvn-response")]
        public string cvnresponse;
        [XmlElement("partial-cc-number")]
        public string partialccnumber;
        [XmlElement("buyer-account-age")]
        public int buyeraccountage;
        [XmlElement("ip-address")]
        public string ipaddress;
    }

    public partial class Address
    {
        [XmlElement("email")]
        public string email;
        [XmlElement("phone")]
        public string phone;
        [XmlElement("contact-name")]
        public string contactname;
        [XmlElement("company-name")]
        public string companyname;
        [XmlElement("fax")]
        public string fax;
        [XmlElement("address1")]
        public string address1;
        [XmlElement("address2")]
        public string address2;
        [XmlElement("country-code")]
        public string countrycode;
        [XmlElement("region")]
        public string region;
        [XmlElement("city")]
        public string city;
        [XmlElement("postal-code")]
        public string postalcode;
    }

    public partial class PickupShippingAdjustment
    {
        [XmlElement("shipping-name")]
        public string shippingname;
        [XmlElement("shipping-cost")]
        public PickupShippingAdjustmentShippingcost shippingcost;
    }

    public partial class PickupShippingAdjustmentShippingcost : Money { }

    public partial class FlatRateShippingAdjustment
    {
        [XmlElement("shipping-name")]
        public string shippingname;
        [XmlElement("shipping-cost")]
        public FlatRateShippingAdjustmentShippingcost shippingcost;
    }

    public partial class FlatRateShippingAdjustmentShippingcost : Money { }

    public partial class MerchantCalculatedShippingAdjustment
    {
        [XmlElement("shipping-name")]
        public string shippingname;
        [XmlElement("shipping-cost")]
        public MerchantCalculatedShippingAdjustmentShippingcost shippingcost;
    }

    public partial class MerchantCalculatedShippingAdjustmentShippingcost : Money { }

    public partial class CarrierCalculatedShippingAdjustment    // this was missing from xsd
    {
        [XmlElement("shipping-name")]
        public string shippingname;
        [XmlElement("shipping-cost")]
        public Money shippingcost;
    }
    
    public partial class CouponAdjustment
    {
        [XmlElement("message")]
        public string message;
        [XmlElement("calculated-amount")]
        public CouponAdjustmentCalculatedamount calculatedamount;
        [XmlElement("applied-amount")]
        public CouponAdjustmentAppliedamount appliedamount;
        [XmlElement("code")]
        public string code;
    }

    public partial class CouponAdjustmentCalculatedamount : Money { }

    public partial class CouponAdjustmentAppliedamount : Money { }

    public partial class GiftCertificateAdjustment
    {
        [XmlElement("message")]
        public string message;
        [XmlElement("calculated-amount")]
        public GiftCertificateAdjustmentCalculatedamount calculatedamount;
        [XmlElement("applied-amount")]
        public GiftCertificateAdjustmentAppliedamount appliedamount;
        [XmlElement("code")]
        public string code;
    }

    public partial class GiftCertificateAdjustmentCalculatedamount : Money { }

    public partial class GiftCertificateAdjustmentAppliedamount : Money { }

    public partial class OrderAdjustment
    {
        [XmlElement("merchant-calculation-successful")]
        public bool merchantcalculationsuccessful;
        [XmlIgnoreAttribute()]
        public bool merchantcalculationsuccessfulSpecified;
        [XmlElement("merchant-codes")]
        public OrderAdjustmentMerchantcodes merchantcodes;
        [XmlElement("total-tax")]
        public OrderAdjustmentTotaltax totaltax;
        [XmlElement("shipping")]
        public OrderAdjustmentShipping shipping;
        [XmlElement("adjustment-total")]
        public Money adjustmenttotal;
    }

    public partial class OrderAdjustmentMerchantcodes
    {
        [XmlElement("coupon-adjustment", typeof(CouponAdjustment))]
        [XmlElement("gift-certificate-adjustment", typeof(GiftCertificateAdjustment))]
        public object[] items;
    }

    public partial class OrderAdjustmentTotaltax : Money { }

    public partial class OrderAdjustmentShipping
    {
        [XmlElement("flat-rate-shipping-adjustment", typeof(FlatRateShippingAdjustment))]
        [XmlElement("merchant-calculated-shipping-adjustment", typeof(MerchantCalculatedShippingAdjustment))]
        [XmlElement("carrier-calculated-shipping-adjustment", typeof(CarrierCalculatedShippingAdjustment))] // this was missing from xsd
        [XmlElement("pickup-shipping-adjustment", typeof(PickupShippingAdjustment))]
        public object item;
    }

    public partial class OrderProcessingSupport
    {
        [XmlElement("request-initial-auth-details")]
        public bool requestinitialauthdetails;
        [XmlIgnoreAttribute()]
        public bool requestinitialauthdetailsSpecified;
    }

    public partial class RoundingPolicy
    {
        [XmlElement("mode")]
        public RoundingMode mode;
        [XmlElement("rule")]
        public RoundingRule rule;
    }

    public partial class MerchantCalculations
    {
        [XmlElement("merchant-calculations-url")]
        public string merchantcalculationsurl;
        [XmlElement("accept-merchant-coupons")]
        public bool acceptmerchantcoupons;
        [XmlIgnoreAttribute()]
        public bool acceptmerchantcouponsSpecified;
        [XmlElement("accept-gift-certificates")]
        public bool acceptgiftcertificates;
        [XmlIgnoreAttribute()]
        public bool acceptgiftcertificatesSpecified;
    }

    public partial class UrlParameter
    {
        [XmlAttribute("name")]
        public string name;
        [XmlAttribute("type")]
        public string type;
    }

    public partial class ParameterizedUrl
    {
        [XmlArrayItem("url-parameter", IsNullable = false)]
        public UrlParameter[] parameters;
        [XmlAttribute("url")]
        public string url;
    }

    public partial class CarrierCalculatedShippingOption
    {
        [XmlElement("price")]
        public CarrierCalculatedShippingOptionPrice price = new CarrierCalculatedShippingOptionPrice();
        [XmlElement("shipping-company")]
        public string shippingcompany;
        [XmlElement("shipping-type")]
        public string shippingtype;
        [XmlElement("carrier-pickup")]
        public string carrierpickup;
        [XmlElement("additional-fixed-charge")]
        public Money additionalfixedcharge;
        [XmlElement("additional-variable-charge-percent")]
        public double additionalvariablechargepercent;
        [XmlIgnoreAttribute()]
        public bool additionalvariablechargepercentSpecified;
    }

    public partial class CarrierCalculatedShippingOptionPrice : Money { }

    public partial class Dimension
    {
        [XmlAttribute("value")]
        public double value;
        [XmlAttribute("unit")]
        public string unit;
    }

    public partial class ShippingPackage
    {
        [XmlElement("length")]
        public Dimension length = new Dimension();
        [XmlElement("width")]
        public Dimension width = new Dimension();
        [XmlElement("height")]
        public Dimension height = new Dimension();
        [XmlElement("ship-from")]
        public AnonymousAddress shipfrom = new AnonymousAddress();
        [XmlElement("delivery-address-category")]
        public string deliveryaddresscategory;
    }

    public partial class CarrierCalculatedShipping
    {
        [XmlArray("shipping-packages")]
        [XmlArrayItem("shipping-package")]
        public ShippingPackage[] shippingpackages;

        [XmlArray("carrier-calculated-shipping-options")]
        [XmlArrayItem("carrier-calculated-shipping-option", IsNullable = false)]
        public CarrierCalculatedShippingOption[] carriercalculatedshippingoptions;
    }

    public partial class Pickup
    {
        [XmlElement("price")]
        public PickupPrice price;
        [XmlAttribute("name")]
        public string name;
    }

    public partial class PickupPrice : Money { }

    public partial class MerchantCalculatedShipping
    {
        [XmlElement("address-filters")]
        public ShippingRestrictions addressfilters;
        [XmlElement("shipping-restrictions")]
        public ShippingRestrictions shippingrestrictions;
        [XmlElement("price")]
        public MerchantCalculatedShippingPrice price;
        [XmlAttribute("name")]
        public string name;
    }

    public partial class ShippingRestrictions
    {
        [XmlElement("allowed-areas")]
        public ShippingRestrictionsAllowedareas allowedareas;
        [XmlElement("excluded-areas")]
        public ShippingRestrictionsExcludedareas excludedareas;
        [XmlElement("allow-us-po-box")]
        public bool allowuspobox;
        [XmlIgnoreAttribute()]
        public bool allowuspoboxSpecified;
    }

    public partial class ShippingRestrictionsAllowedareas
    {
        [XmlElement("postal-area", typeof(PostalArea))]
        [XmlElement("us-country-area", typeof(USCountryArea))]
        [XmlElement("us-state-area", typeof(USStateArea))]
        [XmlElement("us-zip-area", typeof(USZipArea))]
        [XmlElement("world-area", typeof(WorldArea))]
        public object[] items;
    }

    public partial class PostalArea
    {
        [XmlElement("country-code")]
        public string countrycode;
        [XmlElement("postal-code-pattern")]
        public string postalcodepattern;
    }

    public partial class USCountryArea
    {
        [XmlAttribute("country-area")]
        public USAreas countryarea;
    }

    public partial class USStateArea
    {
        [XmlElement("state")]
        public string state;
    }

    public partial class USZipArea
    {
        [XmlElement("zip-pattern")]
        public string zippattern;
    }

    public partial class WorldArea { }

    public partial class ShippingRestrictionsExcludedareas
    {
        [XmlElement("postal-area", typeof(PostalArea))]
        [XmlElement("us-country-area", typeof(USCountryArea))]
        [XmlElement("us-state-area", typeof(USStateArea))]
        [XmlElement("us-zip-area", typeof(USZipArea))]
        [XmlElement("world-area", typeof(WorldArea))]
        public object[] items;
    }

    public partial class MerchantCalculatedShippingPrice : Money { }

    public partial class FlatRateShipping
    {
        [XmlElement("price")]
        public FlatRateShippingPrice price;
        [XmlElement("shipping-restrictions")]
        public ShippingRestrictions shippingrestrictions;
        [XmlElement("name")]
        public string name;
    }

    public partial class FlatRateShippingPrice : Money { }

    public partial class AlternateTaxRule
    {
        [XmlElement("rate")]
        public double rate;
        [XmlElement("tax-area")]
        public AlternateTaxRuleTaxarea taxarea;
    }

    public partial class AlternateTaxRuleTaxarea
    {
        [XmlElement("postal-area", typeof(PostalArea))]
        [XmlElement("us-country-area", typeof(USCountryArea))]
        [XmlElement("us-state-area", typeof(USStateArea))]
        [XmlElement("us-zip-area", typeof(USZipArea))]
        [XmlElement("world-area", typeof(WorldArea))]
        public object item;
    }

    public partial class AlternateTaxTable
    {
        [XmlArray("alternate-tax-rules")]
        [XmlArrayItem("alternate-tax-rule")]
        public AlternateTaxRule[] alternatetaxrules;

        [XmlElement("name")]
        public string name;
        [XmlElement("standalone")]
        public bool standalone;
        [XmlIgnoreAttribute()]
        public bool standaloneSpecified;
    }

    public partial class DefaultTaxRule
    {
        [XmlElement("shipping-taxed")]
        public bool shippingtaxed;
        [XmlIgnoreAttribute()]
        public bool shippingtaxedSpecified;
        [XmlElement("rate")]
        public double rate;
        [XmlElement("tax-area")]
        public DefaultTaxRuleTaxarea taxarea;
    }

    public partial class DefaultTaxRuleTaxarea
    {
        [XmlElement("postal-area", typeof(PostalArea))]
        [XmlElement("us-country-area", typeof(USCountryArea))]
        [XmlElement("us-state-area", typeof(USStateArea))]
        [XmlElement("us-zip-area", typeof(USZipArea))]
        [XmlElement("world-area", typeof(WorldArea))]
        public object item;
    }

    public partial class DefaultTaxTable
    {
        [XmlArray("tax-rules")]
        [XmlArrayItem("default-tax-rule")]
        public DefaultTaxRule[] taxrules;
    }

    public partial class TaxTables
    {
        [XmlElement("default-tax-table")]
        public DefaultTaxTable defaulttaxtable;

        [XmlArray("alternate-tax-tables")]
        [XmlArrayItem("alternate-tax-table")]
        public AlternateTaxTable[] alternatetaxtables;

        [XmlAttribute("merchant-calculated")]
        public bool merchantcalculated;
        [XmlIgnoreAttribute()]
        public bool merchantcalculatedSpecified;
    }

    public partial class MerchantCheckoutFlowSupport
    {
        //private static string USplatformidField = "143344696593954";
        //private static string UKplatformidField = "106613711935272";

        [XmlElement("edit-cart-url")]
        public string editcarturl;
        [XmlElement("continue-shopping-url")]
        public string continueshoppingurl;
        [XmlElement("tax-tables")]
        public TaxTables taxtables;
        [XmlElement("shipping-methods", IsNullable = false)]
        public MerchantCheckoutFlowSupportShippingmethods shippingmethods;

        [XmlArray("parameterized-urls")]
        [XmlArrayItem("parameterized-url")]
        public ParameterizedUrl[] parameterizedurls;

        [XmlElement("merchant-calculations")]
        public MerchantCalculations merchantcalculations;
        [XmlElement("request-buyer-phone-number")]
        public bool requestbuyerphonenumber;
        [XmlIgnoreAttribute()]
        public bool requestbuyerphonenumberSpecified;
        [XmlElement("analytics-data")]
        public string analyticsdata;
        [XmlElement("platform-id")]
        public string platformid = "672909776059745";//IS Merchant ID -- CommonLogic.IIF(Localization.StoreCurrency() == "USD", USplatformidField, UKplatformidField);
        [XmlElement("rounding-policy")]
        public RoundingPolicy roundingpolicy = new gc.RoundingPolicy();
    }

    public partial class MerchantCheckoutFlowSupportShippingmethods
    {
        [XmlElement("carrier-calculated-shipping", typeof(CarrierCalculatedShipping))]
        [XmlElement("flat-rate-shipping", typeof(FlatRateShipping))]
        [XmlElement("merchant-calculated-shipping", typeof(MerchantCalculatedShipping))]
        [XmlElement("pickup", typeof(Pickup))]
        public object[] items;
    }

    public partial class DigitalContent
    {
        [XmlElement("key")]
        public string key;
        [XmlElement("url")]
        public string url;
        [XmlElement("email-delivery")]
        public bool emaildelivery;
        [XmlIgnoreAttribute()]
        public bool emaildeliverySpecified;
        [XmlElement("description")]
        public string description;
        [XmlElement("display-disposition")]
        public string displaydisposition;
    }

    public partial class ItemWeight
    {
        [XmlAttribute("value")]
        public double value;
        [XmlAttribute("unit")]
        public string unit;
    }

    public partial class Item
    {
        [XmlElement("item-weight")]
        public ItemWeight itemweight;
        [XmlElement("digital-content")]
        public DigitalContent digitalcontent;
        [XmlElement("tax-table-selector")]
        public string taxtableselector;
        [XmlElement("item-name")]
        public string itemname;
        [XmlElement("item-description")]
        public string itemdescription;
        [XmlElement("unit-price")]
        public Money unitprice = new gc.Money();
        [XmlElement("quantity")]
        public int quantity;
        [XmlElement("merchant-item-id")]
        public string merchantitemid;
        [XmlElement("merchant-private-item-data")]
        public anyMultiple merchantprivateitemdata;
    }

    public partial class anyMultiple
    {
        [XmlTextAttribute()]
        [XmlAnyElementAttribute()]
        public XmlNode[] Any;
    }

    public partial class CartExpiration
    {
        [XmlElement("good-until-date")]
        public System.DateTime gooduntildate;
    }

    public partial class ShoppingCart
    {
        [XmlElement("merchant-private-data")]
        public anyMultiple merchantprivatedata;
        [XmlElement("cart-expiration")]
        public CartExpiration cartexpiration = new gc.CartExpiration();
        [XmlArrayItem("item")]
        public Item[] items;
    }

    public partial class CheckoutShoppingCartCheckoutflowsupport
    {
        [XmlElement("merchant-checkout-flow-support")]
        public MerchantCheckoutFlowSupport item;
    }
}